/**
 * Copyright (C) 2013 SHANGHAI VOLKSWAGEN, All rights reserved.
 * License version 1.0, a copy of which has been included with this.
 *
 * @File name：com.market.test.server.controller.UserController
 * @Create on：2024/3/8
 * @Author：liuchang
 */
package com.market.test.server.controller;

import com.market.test.common.domain.User;
import com.market.test.server.service.impl.UserWrapBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Callable;

/**
 * <p>ClassName：UserController</p >
 * <p>Description：</p >
 * <p>Author：liuchang</p >
 * <p>Date：2024/3/8</p >
 */
@RestController
@RequestMapping("/user")
public class UserController {
    //用户打包查询服务
    @Autowired
    private UserWrapBatchService userWrapBatchService;

    @GetMapping("/findAllUser/{userId}")
    public Callable<User>findAllUser(@PathVariable Integer userId){
         return new Callable<User>() {
             @Override
             public User call() throws Exception {
                 return userWrapBatchService.queryUser(userId);
             }
         };
    }
}
